package jmine.tec.environment;

import bancosys.tec.exception.LocalizedMessageHolder;
import bancosys.tec.exception.MessageCreator;
import bancosys.tec.exception.MessageCreatorHelper;

/**
 * @author lundberg
 */
public enum EnvironmentMessages implements MessageCreator {
    FILE_NOT_FOUND(1, "environment.fileNotFound"),

    ERROR_EXECUTING_REF_DB(0, "environment.errorExecutingRefDb"),

    ERROR_EXECUTING_REF_DB_ENTRY(1, "environment.errorExecutingRefDbEntry"),

    LOADER_NOT_FOUND_FOR_ENTRY(2, "environment.loader.not.found.for.entry");

    private final MessageCreator delegate;

    /**
     * Construtor
     * 
     * @param nargs nargs
     * @param key key
     */
    private EnvironmentMessages(int nargs, String key) {
        this.delegate = MessageCreatorHelper.creator("jmine-tec-environment-messages", key, nargs);
    }

    /**
     * {@inheritDoc}
     */
    public LocalizedMessageHolder create(Object... arguments) {
        return this.delegate.create(arguments);
    }

    /**
     * {@inheritDoc}
     */
    public int getExpectedArguments() {
        return this.delegate.getExpectedArguments();
    }
}
